package data;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;

public class Data implements PropertyChangeSpeaker, Comparable<Data>{
	
	private int id = -1;
	
	protected PropertyChangeSupport changeSupport;

	public Data() {
		changeSupport = new PropertyChangeSupport(this);		
	}
	
	public Data(int id) {
		this();
		this.id = id;
	}

	@Override
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.addPropertyChangeListener(listener);
	}

	@Override
	public void removePropertyChangeListener(PropertyChangeListener listener) {
		changeSupport.removePropertyChangeListener(listener);
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Override
	public int compareTo(Data o) {
		return 0;
	}
}
